package com.ruc.dbiir.rest.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ruc.dbiir.rest.utils.ParseUtil;


@Controller
@RequestMapping(value = "/highEchart")
public class HignChartsController {

//	@Resource(name = "readKafka")
//	private ReadKafka readKafka;
	public static int x = 1;
	public static int y = 2;


	@RequestMapping(value = "/getXY")
	@ResponseBody
	public Object getRealUsersByAno() {
		System.out.println("hhh");
		String jsonStr = "["+x+","+y+"]";
		x++;
		y++;
		return ParseUtil.toObject(jsonStr);
	}
	
//	@RequestMapping(value = "/startConsumer")
//	public void startConsumer() {
////		new ReadKafka().consume();
//		System.out.println("consumer has been started!!!!");
//	}

	@RequestMapping(value = "/getNum")
	@ResponseBody
	public Object getNum() {
		System.out.println("kkkk");
//		String num = Config.NUMQUEUE.poll();
		return ParseUtil.toObject("");
	}

}
